@{
	IDocument containingAssembly = Model.Get<IDocument>("ContainingAssembly");
	if(containingAssembly != null)
	{
		<li class="header">Assembly</li>
		<li>@Context.GetTypeLink(containingAssembly, false)</li>
	}

	IDocument containingNamespace = Model.Get<IDocument>("ContainingNamespace");
	if(containingNamespace != null)
	{
		<li class="header">Namespace</li>
		<li>@Context.GetTypeLink(containingNamespace, false)</li>
	}
	
	IDocument containingType = Model.Get<IDocument>("ContainingType");
	if(containingType != null)
	{
		<li class="header">Type</li>
		<li>@Context.GetTypeLink(containingType, false)</li>
		
		<li role="separator" class="divider"></li>
		
		IReadOnlyList<IDocument> constructors = containingType
			.List<IDocument>("Constructors")
			.Where(x => x.Bool("IsResult"))
			.ToList();
		if(constructors != null && constructors.Count > 0)
		{
			<li class="header">Constructors</li>
			foreach(IDocument constructor in constructors)
			{
				string selectedClass = constructor.String("SymbolId") == Model.String("SymbolId") ? "selected" : null;
				<li class="@selectedClass">@Context.GetTypeLink(constructor, false)</li>
			}
		}			
	
		foreach(IGrouping<string, IDocument> memberGroup 
			in containingType.List<IDocument>("Members")
				.Where(x => x.Bool("IsResult"))
				.GroupBy(x => x.String("Kind")))
		{
			<li class="header">@memberGroup.Key Members</li>
			foreach(IDocument member in memberGroup
				.OrderBy(x => x.String("Name")))
			{
				string selectedClass = member.String("SymbolId") == Model.String("SymbolId") ? "selected" : null;
				<li class="@selectedClass">@Context.GetTypeLink(member, false)</li>
			}	
		}
	}
}